@layout("/common/_container.html"){
<div class="ibox float-e-margins">
    <div class="ibox-content">
        <form class="form-horizontal">
            <div class="row">
                <input type="hidden" value="${org.id}" name="orgId" >
                <div class="col-sm-12 b-r">
                            <#input id="name"  name="方案名称" underline="true"/>
                    <#select id="termId" name="所属学期" >
                    @for(term in schoolTerm){
                    <option value="${term.termId}">${term.termName}</option>
                    @}
                </#select>
                <div class="form-group" style="float:left;display:flex;width:100%">
                    <label class="labels">方案应用时间:</label>
                    <input class="form-control" style="width: 40%"  type="text" placeholder="开始时间"  name="startTime" value="${start}" id="startTime" readonly="true">
                    <span style="float:left;margin:6px;">至</span>
                    <input class="form-control" style="width: 40%"   type="text" placeholder="结束时间"  value="${end}"   name="endTime" id="endTime" readonly="true">
                </div>
                <div class="hr-line-dashed"></div>
                <div class="form-group" style="float:left;display:flex;width:100%">
                    <label class="labels">每周应用范围:</label>
                    @for(week in metaList){
                    <input  type="checkbox" id="week" name="week" checked="checked" value="${week.value}">${week.name}
                    @}
                </div>
                <div class="hr-line-dashed"></div>
                <#select id="sections" name="节次数量" underline="true">
                @for(section in sectionCount){
                <option value="${section}">${section}</option>
                @}
            </#select>
                <div class="unit">
                    <label class="labels">各节次时间：</label>
                    <table id="table1" class="table1">
                        <tr>
                            <td>第1节</td>
                            <td>
                                <input name="stStartTime" type="time" datefmt="HH:mm" class="required" onclick="getPoint()" onmouseout="openDisabled()" >
                                <span> 至 </span>
                                <input datefmt="HH:mm" type="time" name="stEndTime" class="required" onclick="getPoint()" onmouseout="openDisabled()">
                            </td>
                        </tr>
                        <tr>
                            <td>第2节</td>
                            <td>
                                <input name="stStartTime" type="time" class="required" onclick="getPoint()" onmouseout="openDisabled()">
                                <span> 至 </span>
                                <input type="time" name="stEndTime" class="required" onclick="getPoint()" onmouseout="openDisabled()">
                            </td>
                        </tr>
                        <tr>
                            <td>第3节</td>
                            <td>
                                <input name="stStartTime" type="time" class="required" onclick="getPoint()" onmouseout="openDisabled()">
                                <span> 至 </span>
                                <input type="time" name="stEndTime" class="required" onclick="getPoint()" onmouseout="openDisabled()">
                            </td>
                        </tr>
                        <tr>
                            <td>第4节</td>
                            <td>
                                <input name="stStartTime" type="time" class="required" onclick="getPoint()" onmouseout="openDisabled()">
                                <span> 至 </span>
                                <input type="time" name="stEndTime" class="required" onclick="getPoint()" onmouseout="openDisabled()">
                            </td>
                        </tr>
                    </table>
                </div>
                </form>
            </div>

            <div class="row btn-group-m-t">
                <div class="col-sm-10" style="text-align: center">
                    <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="PtSectionCategoryInfoDlg.addSubmit()"/>
                    <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="PtSectionCategoryInfoDlg.close()"/>
                </div>
            </div>
        </div>

    </div>
</div>
<script src="${ctxPath}/static/modular/system/ptSectionCategory/ptSectionCategory_info.js"></script>
<style>
    .labels{
        float: left;
        width: 120px;
        padding: 0 5px;
        line-height: 21px;
        margin-left: 107px;

    }
    .unit{
        display: block;
        margin: 0;
        padding: 5px 0;
        position: relative;
        clear: both;
    }
    table {
        width: 100px;
        table-layout: initial;
    }
    .table1 {
        border-collapse: separate;
        border-spacing: 0;
        margin-left: 148px;
        font-size: 15px;
    }

</style>
<script>
    function getPoint() {
        $("#name").attr("disabled",true);
    }

    function openDisabled(){
        $("#name").attr("disabled",false);
    }
</script>
@}
